import BaseModel from "../../../cfw/mvc/BaseModel";
import ModelManager from "../../../cfw/mvc/ModelManager";
import GiftItemModel from "./GiftItemModel";
import ModuleManager from "../../../cfw/module/ModuleManager";

export default class GiftMgr extends BaseModel {
    private static ins: GiftMgr;

    static instance() {
        if (!this.ins) {
            this.ins = new GiftMgr()
        }
        return this.ins;
    }

    protected items: ModelManager<GiftItemModel> = new ModelManager()

    constructor() {
        super();
        this.items.initWithData(ModuleManager.dataManager.get(GiftItemModel.CLASS_NAME), GiftItemModel)
    }

    getList() {
        return this.items.getList()
    }
}
